package com.wbl.tijianssm.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wbl.tijianssm.pojo.Doctor;
import com.wbl.tijianssm.pojo.Users;
import com.wbl.tijianssm.response.ApiRestResponse;
import com.wbl.tijianssm.service.DoctorService;
import com.wbl.tijianssm.mapper.DoctorMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.xml.ws.soap.Addressing;
import java.util.List;

/**
* @author yy
* @description 针对表【doctor】的数据库操作Service实现
* @createDate 2024-09-18 10:09:07
*/
@Service
public class DoctorServiceImpl extends ServiceImpl<DoctorMapper, Doctor>
    implements DoctorService{

    @Autowired
    DoctorMapper doctorMapper;

    @Override
    public ApiRestResponse getUserAll() {
        List<Doctor> doctors = doctorMapper.selectList(null);
        if(doctors.isEmpty()){
            return ApiRestResponse.error(1006,"获取失败");
        }else {
            return ApiRestResponse.success(doctors);
        }
    }
}




